package uscdb.dao.impl;

import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Repository;

import uscdb.dao.VersionDaoI;
import uscdb.model.Tversion;

@Repository
public class VersionDaoImpl extends BaseDaoImpl<Tversion> implements VersionDaoI {

	@Override
	public Tversion getByName(String versionName) {
		String hql = "from Tversion t where t.name = :versionName";
		Map<String, Object> params = new HashMap<String, Object>();
		params.put("versionName", versionName);
		Tversion tversion = get(hql, params);
		if (null != tversion) {
			return tversion;
		}

		return null;
	}

}
